﻿<%@ Page Language="C#" AutoEventWireup="true" %>

<%@ Import Namespace="System.Net" %>
<%@ Import Namespace="System.IO" %>
<script runat="server">
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!string.IsNullOrEmpty(this.Request["url"]))
        {
            this.Response.Write(this.GetHtml(this.Request["url"]));
        }
    }
    string GetHtml(string url)
    {
        WebRequest Request = WebRequest.Create(url);
        WebResponse Response = Request.GetResponse();
        Stream resStream = Response.GetResponseStream();
        StreamReader sr = new StreamReader(resStream, Encoding.UTF8);
        StringBuilder sb = new StringBuilder();
        string rl;
        while ((rl = sr.ReadLine()) != null)
        {
            sb.Append(rl);
        }
        return sb.ToString();
    }
</script>
